package com.ruoyi.emergency.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; //添加
import com.ruoyi.emergency.domain.EmergencyPlan;
import com.ruoyi.emergency.mapper.EmergencyPlanMapper;
import com.ruoyi.emergency.service.IEmergencyPlanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 应急预案Service业务层处理
 * 
 * @author hcc
 * @date 2024-11-17
 */
@Service
public class EmergencyPlanServiceImpl extends ServiceImpl<EmergencyPlanMapper, EmergencyPlan> implements IEmergencyPlanService //修改
{
    @Autowired
    private EmergencyPlanMapper emergencyPlanMapper;

    /**
     * 查询应急预案
     * 
     * @param id 应急预案主键
     * @return 应急预案
     */
    @Override
    public EmergencyPlan selectEmergencyPlanById(Long id)
    {
        return emergencyPlanMapper.selectEmergencyPlanById(id);
    }

    /**
     * 查询应急预案列表
     * 
     * @param emergencyPlan 应急预案
     * @return 应急预案
     */
    @Override
    public List<EmergencyPlan> selectEmergencyPlanList(EmergencyPlan emergencyPlan)
    {
        return emergencyPlanMapper.selectEmergencyPlanList(emergencyPlan);
    }

    /**
     * 新增应急预案
     * 
     * @param emergencyPlan 应急预案
     * @return 结果
     */
    @Override
    public int insertEmergencyPlan(EmergencyPlan emergencyPlan)
    {
        return emergencyPlanMapper.insertEmergencyPlan(emergencyPlan);
    }

    /**
     * 修改应急预案
     * 
     * @param emergencyPlan 应急预案
     * @return 结果
     */
    @Override
    public int updateEmergencyPlan(EmergencyPlan emergencyPlan)
    {
        return emergencyPlanMapper.updateEmergencyPlan(emergencyPlan);
    }

    /**
     * 批量删除应急预案
     * 
     * @param ids 需要删除的应急预案主键
     * @return 结果
     */
    @Override
    public int deleteEmergencyPlanByIds(Long[] ids)
    {
        return emergencyPlanMapper.deleteEmergencyPlanByIds(ids);
    }

    /**
     * 删除应急预案信息
     * 
     * @param id 应急预案主键
     * @return 结果
     */
    @Override
    public int deleteEmergencyPlanById(Long id)
    {
        return emergencyPlanMapper.deleteEmergencyPlanById(id);
    }
}
